<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <ul>
      <li v-for="item in list" v-if="item.flag" :key="item.name">{{item.name}}</li>
      <!-- <template v-if="list.length>0">
        <li v-for="item in list" :key="item.name">{{item.name}}</li>
      </template> -->
    </ul>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
  <script>
    const app = new Vue({
      el: "#app",
      data() {
        return {
          list: [{
              flag: true,
              name: '战三'
            },
            {
              flag: false,
              name: '李四'
            },
            {
              flag: false,
              name: '王五'
            }
          ]
        }
      },
      computed:{
        userList(){
          return this.list.filter(item => item.flag)
        }
      }
    })
    console.log(app.$options.render)
  </script>
</body>

</html>